class Solution(object):
    def destCity(self, paths):
        t = set()
        for x, _ in paths:
            t.add(x)
        for _, y in paths:
            if y not in t:
                return y
